<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"
	/>
	<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
	<link rel="stylesheet" type="text/css" href="./css/aui.css" />
</head>

<body>
	<header class="aui-bar aui-bar-nav" style="position:fixed;background:red;" id="aui-header">
		<div id="header-title" class="aui-title">
			顶部菜单
		</div>
	</header>
	<div id="main" style="overflow: auto"></div>
	<footer class="aui-bar aui-bar-tab" id="footer">
		<div class="aui-bar-tab-item aui-active" tapmode>
			<i class="aui-iconfont aui-icon-home"></i>
			<div class="aui-bar-tab-label">
				资讯
			</div>
		</div>
		<div class="aui-bar-tab-item" tapmode>
			<i class="aui-iconfont aui-icon-camera"></i>
			<div class="aui-bar-tab-label">
				直播
			</div>
		</div>
		<!--<div class="aui-bar-tab-item" tapmode>
			<i class="aui-iconfont aui-icon-camera"></i>
			<div class="aui-bar-tab-label">
				视频直播测试
			</div>
		</div>-->
	</footer>
</body>
<script type="text/javascript" src="./script/api.js"></script>
<script type="text/javascript" src="./script/aui-tab.js"></script>
<script type="text/javascript">
	apiready = function () {
		api.parseTapmode();
		var header = $api.byId('aui-header');
		//			$api.fixIos7Bar(header);
		var header_h = $api.offset(header).h;
		var body_h = $api.offset($api.dom('body')).h;
		var footer_h = $api.offset($api.byId('footer')).h;
		api.openFrameGroup({
			name: 'group',
			scrollEnabled: false,
			rect: {
				x: 0,
				y: $api.dom('header').offsetHeight,
				w: 'auto',
				h: api.winHeight - header_h - footer_h
			},
			index: 0,
			frames: [{
				name: 'list_article_frm',
				url: './html/list_article_frm.html'
			}, {
				name: 'list_live_frm',
				url: './html/list_live_frm.html'
			}
				// , {
				// 	name: 'video_live_test_frm',
				// 	url: './html/video_live_test_frm.html'
				// }
			]
		}, function (ret, err) { });
		var tab = new auiTab({
			element: document.getElementById("footer")
		}, function (ret) {
			if (ret) {
				switch (ret.index) {
					case 1:
						document.getElementById("header-title").innerHTML = "资讯";
						break;
					case 2:
						document.getElementById("header-title").innerHTML = "直播";
						break;
				}
				api.setFrameGroupIndex({
					name: 'group',
					index: ret.index - 1,
					scroll: true
				});
			}
		});
	};

</script>

</html>